package com.lagou.controller;

import com.lagou.api.IEmailService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by wangq on 2021/9/26.
 */
@RestController
@RequestMapping(value = "/email")
public class EmailController {
    @Reference
    IEmailService emailService;

    @GetMapping("/send/{email}/{code}")
    public Boolean send(@PathVariable String email, @PathVariable String code) {
        return emailService.send(email, code);
    }
}
